<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
    />
    <script src="../lib/flexible.js"></script>
    <link rel="stylesheet" href="../lib/vant.css" />
    <link rel="stylesheet/less" href="../style/index.less" />
    <script src="../lib/less.min.js"></script>
    <script src="../lib/vue.js"></script>
    <script src="../lib/vant.min.js"></script>
    <script src="../js/axios.min.js"></script>
    <script src="../js/base64.min.js"></script>
    <script ignore src="../js/env.js"></script>
    <script ignore src="../js/utils.js"></script>
    <title>一梁一码溯源管理</title>
  </head>
  <body>
    <div id="app">
      <div class="dashboard-screen-container">
        <div
          class="nav-bar-container"
          :style="{
          paddingTop: (client == 'App' ? statusBarHeight || 20 : 0) + 'px',   
          background: '#2D3DF2',
        }"
        >
          <van-nav-bar
            @click-left="onClickBack($event)"
            left-arrow
            :style="{ background: '#2D3DF2'}"
          >
            <template #left>
              <van-icon name="arrow-left" :size="22" color="#FFFFFF" />
            </template>
            <template #title>
              <div class="van-nav-bar-title" :style="{ color: '#FFFFFF' }">
                {{barTitle}}
              </div>
            </template>
          </van-nav-bar>
        </div>
        <div class="detail-container">
          <div class="swiper-container">
            <div class="pull-refresh-container">
              <van-pull-refresh
                :value="loading"
                @refresh="onRefresh"
                ref="pull-refresh"
              >
                <div style="height: 100%">
                  <van-swipe
                    class="my-swipe"
                    indicator-color="white"
                    :loop="false"
                    ref="swiper"
                    :initial-swipe="swiperIndex"
                    :touchable="false"
                    :key="swiperIndex"
                  >
                    <van-swipe-item v-for="(v, i) in tableData" :key="i">
                      <!-- 信息中心下发任务单 -->
                      <template v-if="v.showInfo == 'XiaDan'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">桥梁名称</span>
                            </template>
                            <template #label>
                              <span class="custom-value">
                                {{ formData.bridgeName }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">幅别</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.amClass }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">跨</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.span }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">梁号</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.componentParts }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">梁类型</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.beamTypeDesc }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">下发人员</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.orderUser }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">下发时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.orderTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">出梁操作人</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.ylUser }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">计划生产时间</span>
                            </template>
                            <template #label>
                              <span class="custom-value">
                                {{ formData.planStartTime }} ~ {{
                                formData.planEndTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">计划出梁时间</span>
                            </template>
                            <template #label>
                              <span class="custom-value">
                                {{ formData.planJqStartTime }} ~ {{
                                formData.planJqEndTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">实际生产时间</span>
                            </template>
                            <template #label>
                              <span class="custom-value">
                                {{ formData.actualStartTime }} ~ {{
                                formData.actualEndTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">实际出梁时间</span>
                            </template>
                            <template #label>
                              <span class="custom-value">
                                {{ formData.actualJqStartTime }} ~ {{
                                formData.actualJqEndTime }}
                              </span>
                            </template>
                          </van-cell>
                        </van-cell-group>
                      </template>
                      <!-- 现场接单 -->
                      <template v-if="v.showInfo == 'XianChangJieDan'">
                        <van-cell-group>
                          <van-cell v-for="item in formList" :key="item.id">
                            <template #title>
                              <span class="custom-title"
                                >{{ item.taskNodeDesc }}</span
                              >
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ item.operatePtuser }}</span
                              >
                            </template>
                          </van-cell>
                        </van-cell-group>
                      </template>
                      <!-- 钢筋加工 -->
                      <template v-if="v.showInfo == 'GangJinJiaGong'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">生产开始时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.produceTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">生产结束时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.completeTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">生产用量</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.produceUsage }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">kg</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">质检人</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.testName }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">质检时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.testTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">质检结果</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.testResult == 0 ? "合格" : "不合格"
                                }}
                              </span>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <van-cell-group
                          class="gj-container"
                          v-for="gj in formData.produceList"
                          :key="gj.id"
                        >
                          <van-cell>
                            <template #title>
                              <span class="custom-title">钢筋型号</span>
                            </template>
                            <template #default>
                              <span class="custom-value"
                                >{{ gj.rebarModelDesc }}</span
                              >
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">钢筋直径</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ gj.rebarDiameterDesc }}</span
                              >
                            </template>
                            <template #extra>
                              <div class="custom-extra">mm</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">钢筋品种</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ gj.rebarTypeDesc }}</span
                              >
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">数量</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ gj.rebarNum }}</span
                              >
                            </template>
                            <template #extra>
                              <div class="custom-extra">kg</div>
                            </template>
                          </van-cell>
                        </van-cell-group>
                      </template>
                      <!-- 吊装 -->
                      <template v-if="v.showInfo == 'DiaoZhuang'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">生产线</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.prodLineNumDesc }}
                              </span>
                            </template>
                          </van-cell>
                        </van-cell-group>
                      </template>
                      <!-- 合模 -->
                      <template v-if="v.showInfo == 'MoBanAnZhuang'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">开模时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.openTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">浇筑时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.pourTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">合模时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.closeTime }}
                              </span>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 要料申请 -->
                      <template v-if="v.showInfo == 'YaoLiaoShenQing'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">强度等级</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.strengthGradeDesc }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">方量</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.designVolume }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">m³</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">塌落度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.slump }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">mm</div>
                            </template>
                          </van-cell>
                          <div class="subtitle">设计配合比（kg/m³）</div>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">水泥</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.cement }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">细骨料</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.naturalSand }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">粉煤灰</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.flyAsh }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">水</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.water }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">粗骨料(5-10)</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.zhongshizi }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">mm</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">粗骨料(10-20)</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.dashizi }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">mm</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">外加剂</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.waterReducingAgent }}
                              </span>
                            </template>
                          </van-cell>
                        </van-cell-group>
                      </template>
                      <!-- 拌和生产 -->
                      <template v-if="v.showInfo == 'BanHe'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">开始时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.startTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">结束时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.endTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">总方量</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ Number(formData.totalVolume).toFixed( 2 ) }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">m³</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">总盘数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.total || 0 }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">盘</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">初级预警</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.chuTotal || 0 }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">盘</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">中级预警</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.zhongTotal || 0 }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">盘</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">高级预警</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.gaoTotal || 0 }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">盘</div>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 鱼雷罐运输 -->
                      <template v-if="v.showInfo == 'YuLeiGuanYunShu'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">总次数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.total }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">开始时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.startTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">结束时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.endTime }}
                              </span>
                            </template>
                          </van-cell>
                          <!-- <van-cell>
                            <template #title>
                              <span class="custom-title">总重量</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.weight }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">t</div>
                            </template>
                          </van-cell> -->
                          <!-- <van-cell>
                            <template #title>
                              <span class="custom-title">总方量</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ Number(formData.formul).toFixed( 2 ) }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">m³</div>
                            </template>
                          </van-cell> -->
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 布料 -->
                      <template v-if="v.showInfo == 'BuLiao'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">布料总次数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.total }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">次</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">布料总重量</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.weightSum }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">t</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">布料开始时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.startTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">布料结束时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.endTime }}
                              </span>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 振捣 -->
                      <template v-if="v.showInfo == 'ZhenDao'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">振捣总次数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.total }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">次</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">振捣频率</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.frequency }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">Hz</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">振捣开始时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.startTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">振捣结束时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.endTime }}
                              </span>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 开模 -->
                      <template v-if="v.showInfo == 'MoBanChaiChu'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">开模时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.openTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">浇筑时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.pourTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">合模时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.closeTime }}
                              </span>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 蒸养 -->
                      <template v-if="v.showInfo == 'ZhengYang'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">养生类型</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.type == 1 ? "蒸汽" : "喷淋" }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">开始时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.minColTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">结束时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.maxColTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">养生时长</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.hourLength }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">min</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">平均温度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.avgTmp }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">℃</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">最高温度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.maxTmp }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">℃</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">最低温度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.minTmp }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">℃</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">平均湿度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.avgRh }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">%RH</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">最高湿度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.maxRh }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">%RH</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">最低湿度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.minRh }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">%RH</div>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 回弹强度检测 -->
                      <template v-if="v.showInfo == 'HuiTanQiangDuJianCe'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">龄期</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.age }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">天</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">平均碳化深度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.carbonization }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">mm</div>
                            </template>
                          </van-cell>
                          <div class="subtitle">
                            测区混凝土抗压强度换算值(MPa)
                          </div>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">平均值</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.averageValue }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">标准差</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.standardDeviation }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">最小值</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.minimumValue }}
                              </span>
                            </template>
                          </van-cell>
                          <div class="subtitle">
                            测区混凝土抗压强度换算值(MPa)
                          </div>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">推定值</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.inferredValue }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">检测报告</span>
                            </template>
                            <template #label>
                              <!-- 图片 -->
                              <template v-if="imageList.length > 0">
                                <div class="images">
                                  <div
                                    class="img"
                                    v-for="(img, idx) in imageList"
                                    :key="img.id"
                                  >
                                    <van-image
                                      width="100%"
                                      height="100%"
                                      fit="contain"
                                      :src="img.imagePath"
                                      @click="previewImage(idx)"
                                    />
                                  </div>
                                </div>
                              </template>
                              <!-- 附件 -->
                              <template v-if="fileList.length > 0">
                                <div
                                  class="file-list"
                                  v-for="file in fileList"
                                  :key="file.id"
                                >
                                  <img :src="getFileType(file.fileType)" />
                                  <span @click="viewData(file)">
                                    {{ file.realFileName }}
                                  </span>
                                </div>
                              </template>
                            </template>
                          </van-cell>
                        </van-cell-group>
                      </template>
                      <!-- 张拉 -->
                      <template v-if="v.showInfo == 'ZhangLa'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">张拉次数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.total }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">合格数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.qualified }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">不合格数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.unqualified }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">合格率</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.rate }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">%</div>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 压浆 -->
                      <template v-if="v.showInfo == 'YaJiang'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">压浆次数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.total }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">合格数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.qualified }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">不合格数</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.unqualified }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">合格率</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.rate }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">%</div>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 喷淋 -->
                      <template v-if="v.showInfo == 'PenLin'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">开始时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.minColTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">结束时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.maxColTime }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">养生时长</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.hourLength }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">min</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">平均温度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.avgTmp }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">℃</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">最高温度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.maxTmp }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">℃</div>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">最低温度</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.minTmp }}
                              </span>
                            </template>
                            <template #extra>
                              <div class="custom-extra">℃</div>
                            </template>
                          </van-cell>
                        </van-cell-group>
                        <div
                          class="details-button"
                          @click="viewDetails(formData)"
                        >
                          <van-icon name="bars" size="20px" />
                          <span class="text"> 查看明细 </span>
                        </div>
                      </template>
                      <!-- 存梁 -->
                      <template v-if="v.showInfo == 'CunLiang'">
                        <van-cell-group>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">存梁完成时间</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.scwcsj }}
                              </span>
                            </template>
                          </van-cell>
                          <van-cell>
                            <template #title>
                              <span class="custom-title">位置</span>
                            </template>
                            <template #default>
                              <span class="custom-value">
                                {{ formData.storageAreaDesc }}
                              </span>
                            </template>
                          </van-cell>
                        </van-cell-group>
                      </template>
                    </van-swipe-item>
                  </van-swipe>
                </div>
                <!-- 触底文案 -->
                <div
                  class="reach-bottom-container"
                  v-if="isReachBottomText && !loading"
                >
                  <van-loading size="24px" v-if="!reachBottomFinished">
                    加载中...
                  </van-loading>
                  <div class="no-more-data" v-else>~没有更多了~</div>
                </div>
              </van-pull-refresh>
            </div>
          </div>
          <div class="page-container">
            <div class="left-icon">
              <van-icon
                @click="prev()"
                name="arrow-left"
                size="20px"
                color="#B9BCC5"
              />
            </div>
            <div class="number">
              {{ swiperIndex + 1 }}<span> /</span>
              {{ tableData.length }}
            </div>
            <div class="right-icon">
              <van-icon
                @click="next()"
                name="arrow"
                size="20px"
                color="#B9BCC5"
              />
            </div>
          </div>
        </div>
        <!-- 图片预览 -->
        <van-image-preview
          v-model="show"
          :images="images"
          :start-position="startPosition"
        >
        </van-image-preview>
      </div>
    </div>
  </body>
</html>
<script type="module">
  var app = new Vue({
    el: "#app",
    data() {
      return {
        //图片预览
        show: false,
        images: [],
        startPosition: 0,
        //
        rows: {},
        swiper: {},
        swiperIndex: 0,
        tableData: [],
        //
        formData: {},
        formList: [],
        imageList: [],
        fileList: [],
        //
        //是否处于加载中状态
        loading: false,
        //是否显示触底文案
        isReachBottomText: false,
        //【触底】是否加载结束
        reachBottomFinished: false,

        //
        statusBarHeight: 0,
        client: "",
        barTitle: "",
      };
    },
    mounted() {
      let { statusBarHeight, client } = getLoginData();
      this.client = client;
      if (client == "App") {
        this.statusBarHeight = statusBarHeight;
      } else {
        this.statusBarHeight = 0;
      }
      this.$nextTick((_) => {
        this.initOperate();
        this.getInitPage();
      });
    },
    methods: {
      onClickBack() {
        window.history.back();
      },

      //初始化
      initOperate() {
        let scrollview = this.$refs["pull-refresh"]?.$el;
        scrollview.addEventListener(
          "scroll",
          debounce((e) => {
            if (
              Math.ceil(e.target.scrollTop + e.target.clientHeight) >=
              e.target.scrollHeight
            ) {
              //触底
              (!this.reachBottomFinished || !this.isReachBottomText) &&
                this.onReachBottom();
            }
          }, 500),
          true
        );
      },
      clacSize() {
        let scrollview = this.$refs["pull-refresh"]?.$el;
        if (scrollview.scrollHeight <= scrollview.clientHeight) {
          this.isReachBottomText = false;
          return false;
        }
        return true;
      },
      //触底加载
      onReachBottom() {},

      //下拉刷新开启
      onRefresh() {
        this.loading = true;
        Promise.all([this.eventDispatch()]).finally((_) => {
          //关闭下拉刷新
          setTimeout(() => {
            this.loading = false;
          }, 500);
        });
      },

      getFileType,
      //查看明细
      viewDetails(item = {}) {
        let { showInfo } = this.tableData[this.swiperIndex];
        let { data = [] } = item;
        switch (showInfo) {
          //合模
          case "MoBanAnZhuang":
            window.location.href = "../pages/viewOpenModal.html";
            localStorage.setItem("dataSource", JSON.stringify(this.rows));
            break;
          //拌和
          case "BanHe":
            window.location.href = "../pages/viewBanHeModal.html";
            localStorage.setItem("dataSource", JSON.stringify(data));
            break;
          //鱼雷罐运输
          case "YuLeiGuanYunShu":
            window.location.href = "../pages/viewYlgModal.html";
            localStorage.setItem("dataSource", JSON.stringify(this.rows));
            break;
          //布料
          case "BuLiao":
            window.location.href = "../pages/viewBlModal.html";
            localStorage.setItem("dataSource", JSON.stringify(this.rows));
            break;
          //振捣
          case "ZhenDao":
            window.location.href = "../pages/viewZdModal.html";
            localStorage.setItem("dataSource", JSON.stringify(this.rows));
            break;
          //合模
          case "MoBanChaiChu":
            window.location.href = "../pages/viewOpenModal.html";
            localStorage.setItem("dataSource", JSON.stringify(this.rows));
            break;
          //蒸养
          case "ZhengYang":
            window.location.href = "../pages/viewZyModal.html";
            localStorage.setItem("dataSource", JSON.stringify(this.rows));
            break;
          //张拉
          case "ZhangLa":
            window.location.href = "../pages/viewZlModal.html";
            localStorage.setItem("dataSource", JSON.stringify(data));
            break;
          //压浆
          case "YaJiang":
            window.location.href = "../pages/viewYjModal.html";
            localStorage.setItem("dataSource", JSON.stringify(data));
            break;
          //喷淋
          case "PenLin":
            window.location.href = "../pages/viewPlModal.html";
            localStorage.setItem("dataSource", JSON.stringify(this.rows));
            break;

          default:
            break;
        }
      },
      getInitPage() {
        this.rows = JSON.parse(localStorage.getItem("ROW_DATA"));
        this.swiper = JSON.parse(localStorage.getItem("SWIPER_DATA"));
        let { index, taskNodeDesc } = this.swiper;
        let swiper = localStorage.getItem("swiper_index");
        let title = localStorage.getItem("swiper_title");
        if (swiper) {
          this.swiperIndex = Number(swiper);
          document.title = title;
          this.barTitle = title;
        } else {
          this.swiperIndex = Number(index);
          document.title = taskNodeDesc;
          this.barTitle = taskNodeDesc;
        }
        this.getBodyFlowList();
      },
      getBodyFlowList() {
        let { token, sysSource, tenantCode } = getLoginData();
        let { id } = this.rows;
        return new Promise((resolve, reject) => {
          axios({
            method: "GET",
            headers: {
              Authorization: `Bearer ${token}`,
              Tenantcode: tenantCode,
              Syssource: sysSource,
            },
            url: `${YX_BASE_API_URL}/beam/lcTaskManager/getBodyFlowList`,
            responseType: "json",
            params: {
              id,
            },
          })
            .then((res) => {
              let {
                data: { data },
              } = res;
              let sourceData = data?.result || [];
              this.tableData = sourceData.filter(
                (v) => v.currentStatus !== "1" && v.currentStatus !== "4"
              );
              this.eventDispatch();
              resolve();
            })
            .catch((_) => {
              this.tableData = [];
              reject();
            })
            .finally((_) => {});
        });
      },
      //事件派发
      eventDispatch() {
        // this.$toast.loading({
        //   duration: 0,
        //   forbidClick: true,
        //   message: "页面加载中",
        // });
        let { showInfo } = this.tableData[this.swiperIndex];
        //下单 吊装 回弹强度检测 存梁
        if (
          showInfo == "XiaDan" ||
          showInfo == "DiaoZhuang" ||
          showInfo == "HuiTanQiangDuJianCe" ||
          showInfo == "CunLiang"
        ) {
          this.getDetail();
        }
        //现场接单
        if (showInfo == "XianChangJieDan") {
          this.getShowInfoByFlag();
        }
        //钢筋加工
        if (showInfo == "GangJinJiaGong") {
          this.getGJJGInfo();
        }
        //合模 / 开模
        if (showInfo == "MoBanAnZhuang" || showInfo == "MoBanChaiChu") {
          this.getMBAZInfo();
        }
        //要料申请
        if (showInfo == "YaoLiaoShenQing") {
          this.getYLSQInfo();
        }
        //拌和
        if (showInfo == "BanHe") {
          this.queryDataByComponentParts();
        }
        //鱼雷罐
        if (showInfo == "YuLeiGuanYunShu") {
          this.getYLGInfo();
        }
        //布料
        if (showInfo == "BuLiao") {
          this.getBLInfo();
        }
        //振捣
        if (showInfo == "ZhenDao") {
          this.getZDInfo();
        }
        //蒸养
        if (showInfo == "ZhengYang") {
          this.getZYInfo();
        }
        //张拉
        if (showInfo == "ZhangLa") {
          this.getZLInfo();
        }
        //压浆
        if (showInfo == "YaJiang") {
          this.getYJInfo();
        }
        //喷淋
        if (showInfo == "PenLin") {
          this.getPlInfo();
        }
      },
      //查询信息中心下发任务单数局
      getDetail() {
        let { token, tenantCode } = getLoginData();
        let { id } = this.rows;
        return new Promise((resolve, reject) => {
          let { showInfo } = this.tableData[this.swiperIndex];
          axios({
            method: "POST",
            headers: {
              Authorization: `Bearer ${token}`,
              Tenantcode: tenantCode,
            },
            url: `${YX_BASE_API_URL}/beam/lcTaskManager/getDetail?id=${id}`,
            responseType: "json",
          })
            .then((res) => {
              let {
                data: { data },
              } = res;
              let {
                prodLineNumDesc = "",
                averageValue = "",
                standardDeviation = "",
                minimumValue = "",
                inferredValue = "",
                age = "",
                carbonization = "",
                configFiles,
              } = data?.result?.lcTaskManagerExtend || {};
              let images = [],
                files = [];
              switch (showInfo) {
                //吊装
                case "DiaoZhuang":
                  this.$set(this.formData, "prodLineNumDesc", prodLineNumDesc);
                  break;
                //回弹强度检测
                case "HuiTanQiangDuJianCe":
                  this.$set(this.formData, "age", age);
                  this.$set(this.formData, "carbonization", carbonization);
                  this.$set(this.formData, "averageValue", averageValue);
                  this.$set(
                    this.formData,
                    "standardDeviation",
                    standardDeviation
                  );
                  this.$set(this.formData, "minimumValue", minimumValue);
                  this.$set(this.formData, "inferredValue", inferredValue);
                  (configFiles ?? []).forEach((item) => {
                    if (getFileTypeData(item.fileType)) {
                      images.push(item);
                    } else {
                      files.push(item);
                    }
                  });
                  this.imageList = images ?? [];
                  this.fileList = files ?? [];
                  break;

                default:
                  this.formData = data?.result ?? {};
                  break;
              }

              resolve();
            })
            .catch((_) => {
              this.formData = {};
              reject(_);
            })
            .finally((_) => {
              this.$toast.clear();
            });
        });
      },
      //查询现场接单
      getShowInfoByFlag() {
        let { token, tenantCode } = getLoginData();
        let { id } = this.rows;
        return new Promise((resolve, reject) => {
          axios({
            method: "GET",
            headers: {
              Authorization: `Bearer ${token}`,
              Tenantcode: tenantCode,
            },
            url: `${YX_BASE_API_URL}/beam/lcTaskManager/getXianChangJieDanViewInfo`,
            responseType: "json",
            params: { id },
          })
            .then((res) => {
              let {
                data: { data },
              } = res;
              let source = data?.result || [];
              this.formList = source;
              resolve();
            })
            .catch((_) => {
              this.formList = [];
              reject(_);
            })
            .finally((_) => {
              this.$toast.clear();
            });
        });
      },
      //钢筋加工
      getGJJGInfo() {
        let { token, tenantCode } = getLoginData();
        let { bridgeName, amClass, span, componentParts } = this.rows;
        axios({
          method: "POST",
          headers: {
            Authorization: `Bearer ${token}`,
            Tenantcode: tenantCode,
          },
          url: `${YX_BASE_API_URL}/beam/rebar-process/getByParams`,
          responseType: "json",
          data: {
            bridgeName,
            amClass,
            span,
            componentParts,
          },
        })
          .then((res) => {
            let {
              data: { data },
            } = res;
            this.formData = data?.result ?? {};
          })
          .catch((_) => {
            this.formData = {};
          })
          .finally((_) => {
            this.$toast.clear();
          });
      },
      //合模/开模
      getMBAZInfo() {
        let { token, tenantCode } = getLoginData();
        let { componentParts } = this.rows;
        axios({
          method: "POST",
          headers: {
            Authorization: `Bearer ${token}`,
            Tenantcode: tenantCode,
          },
          url: `${YX_BASE_API_URL}/beam/quality-template-data/queryDataByComparts`,
          responseType: "json",
          data: {
            componentParts,
          },
        })
          .then((res) => {
            let {
              data: { data },
            } = res;
            this.formData = data?.result ?? {};
          })
          .catch((_) => {
            this.formData = {};
          })
          .finally((_) => {
            this.$toast.clear();
          });
      },
      //要料申请
      getYLSQInfo() {
        let { token, tenantCode } = getLoginData();
        let { id } = this.rows;
        axios({
          method: "GET",
          headers: {
            Authorization: `Bearer ${token}`,
            Tenantcode: tenantCode,
          },
          url: `${YX_BASE_API_URL}/beam/lcTaskManager/getYaoLiaoShenQingViewInfo`,
          responseType: "json",
          params: {
            id,
          },
        })
          .then((res) => {
            let {
              data: { data },
            } = res;
            this.formData = data?.result || {};
          })
          .catch((_) => {
            this.formData = {};
          })
          .finally((_) => {
            this.$toast.clear();
          });
      },
      //拌和(统计、列表)
      queryDataByComponentParts() {
        let { token, tenantCode } = getLoginData();
        let { componentParts } = this.rows;
        return new Promise((resolve, reject) => {
          axios({
            method: "POST",
            headers: {
              Authorization: `Bearer ${token}`,
              Tenantcode: tenantCode,
            },
            url: `${YX_BASE_API_URL}/beam/sn-mp-data/queryDataByComponentParts`,
            responseType: "json",
            data: {
              componentParts,
              tenantCode,
            },
          })
            .then((res) => {
              let {
                data: { data },
              } = res;
              this.formData = data?.result || {};
              resolve();
            })
            .catch((_) => {
              this.formData = {};
              reject();
            })
            .finally((_) => {
              this.$toast.clear();
            });
        });
      },
      //鱼雷罐
      getYLGInfo() {
        let { token, tenantCode } = getLoginData();
        let { componentParts } = this.rows;
        axios({
          method: "POST",
          headers: {
            Authorization: `Bearer ${token}`,
            Tenantcode: tenantCode,
          },
          url: `${YX_BASE_API_URL}/beam/quality-torpedo-ladle/queryStaticsByComparts`,
          responseType: "json",
          data: {
            componentParts,
          },
        })
          .then((res) => {
            let {
              data: { data },
            } = res;
            this.formData = data?.result || {};
          })
          .catch((_) => {
            this.formData = {};
          })
          .finally((_) => {
            this.$toast.clear();
          });
      },
      //布料
      getBLInfo() {
        let { token, tenantCode } = getLoginData();
        let { componentParts } = this.rows;
        return new Promise((resolve, reject) => {
          axios({
            method: "POST",
            headers: {
              Authorization: `Bearer ${token}`,
              Tenantcode: tenantCode,
            },
            url: `${YX_BASE_API_URL}/beam/quality-cloth-data/clothDataStatics`,
            responseType: "json",
            data: {
              componentParts,
            },
          })
            .then((res) => {
              let {
                data: { data },
              } = res;
              this.formData = data?.result || {};
              resolve();
            })
            .catch((_) => {
              this.formData = {};
              reject();
            })
            .finally((_) => {
              this.$toast.clear();
            });
        });
      },
      //振捣
      getZDInfo() {
        let { token, tenantCode } = getLoginData();
        let { componentParts } = this.rows;
        return new Promise((resolve, reject) => {
          axios({
            method: "POST",
            headers: {
              Authorization: `Bearer ${token}`,
              Tenantcode: tenantCode,
            },
            url: `${YX_BASE_API_URL}/beam/quality-boost-island/cboostDataStatics`,
            responseType: "json",
            data: {
              componentParts,
              tenantCode,
            },
          })
            .then((res) => {
              let {
                data: { data },
              } = res;
              this.formData = data?.result || {};
              resolve();
            })
            .catch((_) => {
              this.formData = {};
              reject();
            })
            .finally((_) => {
              this.$toast.clear();
            });
        });
      },
      //蒸养
      getZYInfo() {
        let { token, tenantCode } = getLoginData();
        let { componentParts } = this.rows;
        axios({
          method: "POST",
          headers: {
            Authorization: `Bearer ${token}`,
            Tenantcode: tenantCode,
          },
          url: `${YX_BASE_API_URL}/beam/quality-ys-data-detail/queryDataByComparts`,
          responseType: "json",
          data: {
            componentParts,
            equType: "17",
          },
        })
          .then((res) => {
            let {
              data: { data },
            } = res;
            this.formData = data?.result || {};
          })
          .catch((_) => {
            this.formData = {};
          })
          .finally((_) => {
            this.$toast.clear();
          });
      },
      //张拉
      getZLInfo() {
        let { token, tenantCode } = getLoginData();
        let { componentParts } = this.rows;
        return new Promise((resolve, reject) => {
          axios({
            method: "POST",
            headers: {
              Authorization: `Bearer ${token}`,
              Tenantcode: tenantCode,
            },
            url: `${YX_BASE_API_URL}/beam/sn-zl/queryDataByComponentParts`,
            responseType: "json",
            data: {
              componentParts,
              tenantCode,
            },
          })
            .then((res) => {
              let {
                data: { data },
              } = res;
              this.formData = data?.result || {};
              resolve();
            })
            .catch((_) => {
              this.formData = {};
              reject();
            })
            .finally((_) => {
              this.$toast.clear();
            });
        });
      },
      //压浆
      getYJInfo() {
        let { token, tenantCode } = getLoginData();
        let { componentParts } = this.rows;
        return new Promise((resolve, reject) => {
          axios({
            method: "POST",
            headers: {
              Authorization: `Bearer ${token}`,
              Tenantcode: tenantCode,
            },
            url: `${YX_BASE_API_URL}/beam/sn-yj/queryDataByComponentParts`,
            responseType: "json",
            data: {
              componentParts,
              tenantCode,
            },
          })
            .then((res) => {
              let {
                data: { data },
              } = res;
              this.formData = data?.result || {};
              resolve();
            })
            .catch((_) => {
              this.formData = {};
              reject();
            })
            .finally((_) => {
              this.$toast.clear();
            });
        });
      },
      //喷淋
      getPlInfo() {
        let { token, tenantCode } = getLoginData();
        let { componentParts } = this.rows;
        axios({
          method: "POST",
          headers: {
            Authorization: `Bearer ${token}`,
            Tenantcode: tenantCode,
          },
          url: `${YX_BASE_API_URL}/beam/quality-ys-data/queryDataByComparts`,
          responseType: "json",
          data: {
            componentParts,
            equType: "18",
          },
        })
          .then((res) => {
            let {
              data: { data },
            } = res;
            this.formData = data?.result || {};
          })
          .catch((_) => {
            this.formData = {};
          })
          .finally((_) => {
            this.$toast.clear();
          });
      },

      //上一页
      prev() {
        if (this.swiperIndex > 0) {
          this.swiperIndex--;
          this.$refs.swiper.prev();
          this.eventDispatch();

          let text = this.tableData[this.swiperIndex].taskNodeDesc;
          document.title = text;
          this.barTitle = text;
          localStorage.setItem("swiper_index", this.swiperIndex);
          localStorage.setItem("swiper_title", text);
        }
      },

      //下一页
      next() {
        if (this.swiperIndex < this.tableData.length - 1) {
          this.swiperIndex++;
          this.$refs.swiper.next();
          this.eventDispatch();

          let text = this.tableData[this.swiperIndex].taskNodeDesc;
          document.title = text;
          this.barTitle = text;
          localStorage.setItem("swiper_index", this.swiperIndex);
          localStorage.setItem("swiper_title", text);
        }
      },

      //预览图片
      previewImage(index) {
        let images = this.imageList.map((v) => v.imagePath);
        this.startPosition = index;
        this.show = true;
        this.images = images;
      },

      //预览附件
      viewData(item) {
        let { imagePath } = item;
        window.location.href =
          YX_FILE_VIEW_DOMAIN +
          "/onlinePreview?url=" +
          encodeURIComponent(Base64.encode(imagePath));
      },
    },
    destroyed() {
      this.$toast.clear();
    },
  });
</script>
